package main

import (
	"encoding/json"
	"fmt"
	"io/ioutil"
	"miApiChangeStep/miApi"
	"os"
)
func main() {
	//读取 account.json 文件
	dir, err := os.Getwd()
	if err != nil {
		fmt.Println(err)
		return
	}
	accountFile,err := ioutil.ReadFile(dir + "/account.json")
	if err != nil {
		fmt.Println(err)
		return
	}

	//转账户结构体切片
	var accountESlice []miApi.Account
	err = json.Unmarshal(accountFile,&accountESlice)
	if err != nil {
		fmt.Println(err)
		return
	}

	miApiE := miApi.NewMiApi(accountESlice)
	miApiE.Start()
}